package com.ssm.admin.service.impl;

import com.ssm.admin.entity.dto.AdvertiseDto;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssm.common.utils.PageUtils;
import com.ssm.common.utils.Query;

import com.ssm.admin.dao.SsmAdvertisingDao;
import com.ssm.admin.entity.SsmAdvertisingEntity;
import com.ssm.admin.service.SsmAdvertisingService;


@Service("ssmAdvertisingService")
public class SsmAdvertisingServiceImpl extends ServiceImpl<SsmAdvertisingDao, SsmAdvertisingEntity> implements SsmAdvertisingService {

    @Autowired
    private SsmAdvertisingDao advertisingDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SsmAdvertisingEntity> page = this.page(
                new Query<SsmAdvertisingEntity>().getPage(params),
                new QueryWrapper<SsmAdvertisingEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<AdvertiseDto> advertiseList() {
        return advertisingDao.advertiseList();
    }

}